﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 图的遍历
{
    class Program
    {
        static void Main(string[] args)
        {
            AdjacencyList<char> a = new AdjacencyList<char>();
            //添加顶点
            a.AddVertex('A');
            a.AddVertex('B');
            a.AddVertex('C');
            a.AddVertex('D');
            //添加边
            a.AddEdge('A', 'B');
            a.AddEdge('A', 'C');
            a.AddEdge('A', 'D');
            a.AddEdge('B', 'D');
            Console.WriteLine(a.ToString());
            Console.ReadKey();
        }
    }
}
